package com.lingshi.common.exception;

import lombok.*;

/**
 * 项目全局错误消息和状态码
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum BusCodeEnum {

    //正常
    SUCCESS(200,"success"),

    NOT_LOGIN_ERROR(401,"未登录"),

    //系统异常
    SYSTEM_ERROR(500,"系统异常"),
    //参数异常
    PARAMETER_ERROR(1001,"请求参数异常"),
    DELETE_PERMISSION_ERROR(1002,"当前权限还有角色在使用，不能删除"),
    LOGIN_ERROR(1003,"账号密码错误，请重新输入"),

    INSERT_OR_UPDATE_PRODUCT_TYPE_ERROR(1004,"商品分类最多三级"),
    DELETE_PRODUCT_TYPE_ERROR(1005,"此商品分类下面还有子分类，不能删除"),
    FILE_UPLOAD_ERROR(1006,"上传文件不能为空");


    private Integer code;
    private String message;

}
